import 'dart:io';

import 'package:device_info/device_info.dart';
import 'package:leancloud_storage/leancloud.dart';

class UniqueIDUtil {
  static String deviceID = "";
  static AndroidDeviceInfo androidDeviceInfo;
  static LCUser lcUser;

  static Future getDeviceInfo() async {
    DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
    if (Platform.isIOS) {
//      IosDeviceInfo iosDeviceInfo = await deviceInfo.iosInfo;
//      _deviceID = iosDeviceInfo.identifierForVendor;
      // unique ID on iOS
    } else if (Platform.isAndroid) {
      androidDeviceInfo = await deviceInfo.androidInfo;
      deviceID = androidDeviceInfo.androidId; // unique ID on Android
    }
    print("DeviceInfo ${androidDeviceInfo.board}");
    print("DeviceInfo ${androidDeviceInfo.bootloader}");
    print("DeviceInfo ${androidDeviceInfo.brand}");
    print("DeviceInfo ${androidDeviceInfo.device}");
    print("DeviceInfo ${androidDeviceInfo.hardware}");

  }
}
